<?php
namespace app\admin\controller;

use app\admin\model\Log as LogModel;
use app\BaseController;

class Log extends BaseController
{
    public function index()
    {
        return view();
    }
    public function list_data()
    {
        $key = $this->request->param('key',false);
        $roles = new LogModel;
        if($key){
            $roles = $roles->where('value|user|info','like','%'.$key.'%');
        }
        $roles = $roles->order('id','desc')->paginate();
        return lay_data($roles);
    }
}